//
//  Text_BasicStyle.swift
//  Demo_01
//
//  Created by apple on 2020/7/21.
//  Copyright © 2020 Joseph. All rights reserved.
//

import SwiftUI

// Text类似于UIKit中的UILabel，用于显示一行或多行的文字内容。
struct Text_BasicStyle: View {
    var body: some View {
        VStack{
            //Basic style
            Text("www.hdjc8.com")
            .bold()

            Text("www.hdjc8.com")
            .italic()

            Text("www.hdjc8.com")
            .underline()

            Text("www.hdjc8.com")
            .underline(true, color: .orange)

            Text("www.hdjc8.com")
            .strikethrough()

            Text("www.hdjc8.com")
            .strikethrough(true, color: .orange)

            Text("www.hdjc8.com")
            .foregroundColor(Color.orange)

            Text("www.hdjc8.com")
            .baselineOffset(CGFloat(5.0))
            .background(Color.orange)

             Text("www.hdjc8.com")
             .background(Image("Picture"), alignment: .bottom)

            //Font
            VStack{
            Text("www.hdjc8.com")
                .font(.footnote)

            Text("www.hdjc8.com")
                .font(.system(size: 36))

            Text("www.hdjc8.com")
                .font(.system(.title, design: .monospaced))

            Text("www.hdjc8om")
                .font(.custom("BradleyHandITCTT-Bold", size: 36))

            Text("www.hdjc8.com")
                .fontWeight(Font.Weight.heavy)

            Text("www.hdjc8.com")
                .fontWeight(Font.Weight.ultraLight)

            }
        }
    }
}

struct Text_BasicStyle_Previews: PreviewProvider {
    static var previews: some View {
        Text_BasicStyle()
    }
}
